package ca.uguu.gamelib.libgdx.concepts;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.utils.Disposable;

public abstract class Scene implements Disposable {
	private boolean disposed = false;
	
	@Override
	public void finalize() throws Throwable{
		if(!this.disposed){
			this.dispose();
		}
		super.finalize();
	}
	
	@Override
	public void dispose(){
		this.disposed = true;
	}
	
	protected void clear(){
		Gdx.gl.glClearColor(0, 0, 0, 1);
		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
	}
	
	public void render(){
		this.clear();
	}
	
	public void markResumed(){
		//Tell assets they need to reload their textures
	}
}
